package com.saicmotor.room.Entity;

import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;

/**
 * @Author xinxinzhang
 * @Date 2022/08/16
 **/
@Entity
public class User {

    // 方式一：属性上加
    @PrimaryKey(autoGenerate = true)
    public int id;
    // 方式二：类上加主键
    //@Entity(primaryKeys = {"firstName","secondName"})

    @ColumnInfo(name = "first_name")
    public String firstName;

    @ColumnInfo(name = "second_name")
    public String secondName;
}
